package com.rz.admin.controller;

import com.rz.admin.entity.SysDict;
import com.rz.admin.service.impl.SysDictServiceImpl;
import com.rz.core.kit.RespKit;
import com.rz.core.resp.ResultResp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Rui.Zhou
 * @since 2018-07-12
 */
@RestController
@RequestMapping("/sysDict")
public class SysDictController {
    @Autowired
    private SysDictServiceImpl sysDictService;

    @PostMapping("getPage")
    public ResultResp getPage(@RequestBody SysDict sysDict){
        return RespKit.success(sysDictService.getPage(sysDict));
    }

    @PostMapping("save")
    public ResultResp save(@RequestBody SysDict sysDict){
        return RespKit.success(sysDictService.saveDict(sysDict));
    }

}

